package com.atguigu.gulimail.product.app;

import com.atguigu.common.group.AddGroup;
import com.atguigu.gulimail.product.entity.PersonDemo;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;

/**
 * @ClassName: TestController
 * @Description: test
 * @Date 2022/06/16 09:37
 * @Author songshaoqiu
 **/
@RestController
public class TestController {

    @PostMapping("/gateway")
    public String test(@Valid @RequestBody PersonDemo personDemo){
        return "success";
    }


    @PostMapping("/gateway/add")
    public String testAdd( @Validated(value = {AddGroup.class}) @RequestBody PersonDemo personDemo){

            return "success";
    }

    @PostMapping("/gateway/adds")
    public String sss( @Validated(value = {AddGroup.class}) @RequestBody PersonDemo personDemo){

        return "success";
    }


}
